<?php
namespace Model;

use Sfsn\Core\Model\Model;
use Sfsn\Core\Http\Request;

class Visit extends Model
{

    public $rules = [
        'group'=>['callback'=>'trim']
    ]
    // 'module' => [
    // 'rangelength' => [
    // 20,
    // 25
    // ],
    // 'email'
    // ],
        
    
    ;

    public $message = []
    // 'module' => [
    // 'email' => '邮箱',
    // 'rangelength' => '长度'
    // ],
    
    ;

    public function custom()
    {
        
        $date = date('Y-m-d H:i:s');
        $ip = Request::getClientIp();
        return [
            'ip' => $ip,
            'time' => $date,
            'dateline'=>time(),
            'aera' => '济南',
            'year' => date('Y'),
            'month' => date('m'),
            'day' => date('d')
        ]
        ;
    }

    public function tableName()
    {
        return 'visit';
    }
}